/*
** 1218.c
** 
** Made by (seakage2h)
** Login   <seakage2h@seakage2h-ubuntu>
** 
** Started on  Mon Sep 22 20:40:14 2008 seakage2h
** Last update Sun May 12 01:17:25 2002 Speed Blue
*/

/* #include "1218.h" */
#include <stdio.h>

int main()
{
     int target, instance;
     int i;

     scanf("%d", &instance);
     while(instance){
	  scanf("%d", &target);
	  for(i = 1; i*i <= target; i++);
	  printf("%d\n", i-1);
	  instance--;
     }
     return 0;
}

